html_doc='''
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="content-type" content="text/html;charset=gbk" />
<meta property="wb:webmaster" content="3aababe5ed22e23c" />
<meta name="referrer" content="always" />
<title>比特币定义和用途分别是什么？_百度知道</title>
<link rel="shortcut icon" href="//www.baidu.com/favicon.ico?t=20171027" type="image/x-icon" />
<link rel="icon" sizes="any" mask href="//www.baidu.com/img/baidu.svg" />
<meta itemprop="dateUpdate" content="2019-10-19 08:02:51" />
<meta itemprop="datePublished" content="2018-03-31 17:22:54" />
<meta itemprop="dateLatestReply" content="2019-10-19 08:02:51" />

<link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/common/pkg/common.d37cdeb.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/common/widget/header-metis/header.39c9ddf.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/common/widget/set-tag/set-tag.0b3a009.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/common/widget/task/task-last.3274afd.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/question-new/pkg/aio.8ad44a2.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/question-new/pkg/editor.9a07820.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/common/pkg/ueditor.2ed35c6.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/question-new/widget/ask/replyer/replyer.3ba066d.css" /><link rel="stylesheet" type="text/css" href="https://iknowpc.bdimg.com/static/common/widget/upgrade-tips/upgrade-tips.610a0fe.css" /></head>

<body class="layout-center has-menu">

<div id="userbar" class="userbar userbar-renew" data="">
<ul class="aside-list">
<li>
<a href="http://www.baidu.com/" class="toindex">百度首页</a>
</li>
<li>
<a href="/ihome" class="user-name" target="_blank" id="user-name">jamsonwooii<i class="i-arrow-down"></i></a></li>
</li>
<li alog-alias="userbar-msg" id="userbar-msg"><a class="userbar-msg-a" href="/ihome/notice/center" target="_blank" target="_self">消息<span class="orange-num"><i></i></span></a></li>
<li alog-alias="baidu-msg" id="baidu-msg"><a href="/ichat/chatlist">私信<i class="bd-msg"></i></a></li>
<li class="shop-entrance">
<a href="/shop" title="知道商城">商城<i class="i-house" style="display: none;"></i></a>
<span class="lucky-try"></span>
</li>
</ul>
<div class="sublist-container username-sublist" style="display:none" id="username-sublist">
<div class="sublist-arrow-up"></div>
<ul class="sub-list">
<li><a id="userbar-myinfo" href="/ihome/homepage/recommendquestion" target="_blank">我的主页</a></li>
<li><a id="userbar-my-ask" href="https://zhidao.baidu.com/ihome/homepage/myask" target="_blank">我的提问</a></li>
<li><a id="userbar-my-answer" href="https://zhidao.baidu.com/ihome/homepage/myanwser" target="_blank">我的回答</a></li>
<li><a id="userbar-my-task" href="https://zhidao.baidu.com/ihome/homepage/mytask" target="_blank">我的任务</a></li>
<li><a id="userbar-account" href="http://passport.baidu.com/center" target="_blank">帐号设置</a></li>
<li class="last"><a href="http://passport.baidu.com/?logout&amp;aid=7&amp;u=http%3A//zhidao.baidu.com" id="userbar-logout">退出帐号</a></li>
</ul>
</div>
</div>


<div class="head-wrap">
<hr class="divider">
<header id="header" class="container">
<a log="page:question,action:click,pos:fyb-word" href="#" target="_blank" class="adTopImg from-fyb"></a>


<div id="search-box" class="search-box-new line">
<ul class="channel grid">
<li><a log="sc_pos:c_baidu" data-type='baidu' rel="nofollow" href="http://www.baidu.com/s?cl=3&wd=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5">网页</a></li>
<li><a log="sc_pos:c_news" data-type='news' rel="nofollow" href="https://www.baidu.com/s?rtt=1&bsst=1&cl=2&tn=news&word=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&fr=zhidao">资讯</a></li>
<li><a log="sc_pos:c_video" data-type='video' rel="nofollow" href="https://www.baidu.com/sf/vsearch?pd=video&tn=vsearch&wd=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&rsv_spt=16">视频</a></li>
<li><a log="sc_pos:c_pic" data-type='image' rel="nofollow" href="http://image.baidu.com/search/index?tn=baiduimage&ct=201326592&lm=-1&cl=2&word=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&t=3&ie=gbk">图片</a></li>
<li><strong>知道</strong></li>
<li><a log="sc_pos:c_doc" data-type='wenku' rel="nofollow" href="http://wenku.baidu.com/search?word=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&lm=0&od=0">文库</a></li>
<li><a log="sc_pos:c_tieba" data-type='tieba' rel="nofollow" href="http://tieba.baidu.com/f?kw=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&t=4">贴吧</a></li><li><a log="sc_pos:c_b2b" data-type='b2b' rel="nofollow" href="https://b2b.baidu.com/s?q=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&fr=www">采购</a></li>
<li><a log="sc_pos:c_map" data-type='map' rel="nofollow" href="http://map.baidu.com/m?word=%B1%C8%CC%D8%B1%D2%B6%A8%D2%E5&fr=map007">地图</a></li><li><a log="sc_pos:c_more" data-type="more" href="http://www.baidu.com/more/">更多&raquo;</a></li>
</ul>
<div class="search-block clearfix">
<div class="search-cont clearfix">
<a class="logo" href="/" title="百度知道"></a>
<form action="/search" name="search-form" method="get" id="search-form-new" class="search-form">
<input class="hdi" id="kw" maxlength="256" tabindex="1" size="46" name="word" value="比特币定义" autocomplete="off" placeholder="" />
<button alog-action="g-search-anwser" type="submit" id="search-btn" hidefocus="true"  tabindex="2" class="btn-global">搜索答案</button>
<a href="#" alog-action="g-i-ask" class="i-ask-link" id="ask-btn-new">我要提问</a>
</form>
</div>
</div>
</div>
<div class="wgt-header-title">
<div class="wgt-header-title-content">
<h1 class="wgt-header-title-text">比特币定义和用途分别是什么？</h1>
<span  class="iknow-icons wgt-header-title-btn">&#xe768; 我来答</span><span class="exp-topwld-tip" >新人答题领红包<a class="exp-topwld-tip-close"></a></span>
</div>
</div>

</header>
</div>
<p>Test P </p>
<div class="nav-menu-container" id="j-nav-menu-container">
<div class="nav-show-control">
<div class="nav-menu-layout">
<div class="nav-menu line">
<div class="nav-menu-content container">
<div class="content-box">
<div class="menu-item menu-item-index">
<a class="menu-title " href="/">
首页</a>
</div>
<div class="menu-item-box">
<div class="menu-item menu-item-cat">
<a class="menu-title " href="/list?fr=daohang" target="_blank">
<span>问题分类<img class="triangle_icon" src="https://iknowpc.bdimg.com/static/common/widget/menu/img/triangle.47e7008.svg" alt=""></span>
</a>
<div class="menu-content new-category-menu">
<ul class="menu-sub-list">
<li class="menu-sub-item-wp">
<a class="menu-sub-item" href="/list?fr=daohang" target="_blank">
全部问题</a>
</li>
'''

from bs4 import BeautifulSoup

soup = BeautifulSoup(html_doc,"lxml")
#print(soup.prettify())

#print(soup.title)
#print(soup.title.string)
print(soup.p)
print(soup.a)
print(soup.find(id="user-name"))


